CREATE TABLE [dbo].[wad_calles]
(
[cd_provincia] [dbo].[_codigo] NOT NULL,
[nm_localidad] [dbo].[_nombre] NOT NULL,
[nm_calle] [dbo].[_nombre] NOT NULL,
[nu_altura_desde] [dbo].[_entero] NOT NULL,
[nu_altura_hasta] [dbo].[_entero] NOT NULL,
[cd_postal] [dbo].[_codigo] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[wad_calles] ADD CONSTRAINT [PK_wad_calles] PRIMARY KEY CLUSTERED  ([cd_provincia], [nm_localidad], [nm_calle], [nu_altura_desde]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[wad_calles] ADD CONSTRAINT [FK_wad_calles_wad_localidades] FOREIGN KEY ([cd_provincia], [nm_localidad]) REFERENCES [dbo].[wad_localidades] ([cd_provincia], [nm_localidad]) ON DELETE CASCADE ON UPDATE CASCADE
GO
EXEC sp_bindefault N'[dbo].[cero]', N'[dbo].[wad_calles].[nu_altura_desde]'
GO
EXEC sp_bindefault N'[dbo].[cero]', N'[dbo].[wad_calles].[nu_altura_hasta]'
GO
